const inquirer = require('inquirer')
const {framwork} = require('../../config')
const {framworkUrls} = require('../../config')
const downloadFn = require('./download')
const hlaction = async (project, args) => {
    // 命令行的执行逻辑代码
    console.log(project)
    console.log(args)
    let anweser = await inquirer.prompt([
        {
            type: 'list',
            name: 'framwork',
            choices: framwork,
            message: '选择你所使用的框架'
        }
    ])
    console.log('------ress')
    console.log(anweser)
    // 注意： github、gitlab 等之外的都需要加direct：
    downloadFn( 'direct:' + framworkUrls[anweser.framwork], project)


}

module.exports = hlaction